Requesting and releasing heap memory blocks from the operating system is an important component of computer architectures. Each insertion, update or deletion operation of a database entry can be handled by an underlying memory manager that manages free memory blocks. Due to most applications require more physical memory than it is provided by the system, modern computer architectures use often paging for handling memory requests.
Requests to receive free heap memory blocks or to release them back to the system can be handled by an allocator. It is the responsibility of the allocator to handle memory requests correctly, even if there is insufficient memory available, precisely by returning 0 in the case of insufficient memory. Another challenge is the handling of memory fragmentation, in terms of having sufficient memory that is not available in one contiguous chunk.